package com.yi.gostockgo.service.impl;

import com.yi.gostockgo.controller.vo.BaseVo;
import com.yi.gostockgo.controller.vo.GoNewsVo;
import com.yi.gostockgo.pojo.GoNews;
import com.yi.gostockgo.mapper.GoNewsMapper;
import com.yi.gostockgo.service.GoNewsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 新闻通知公告和广告 服务实现类
 * </p>
 *
 * @author liandyao
 * @since 2020-04-28
 */
@Service
public class GoNewsServiceImpl extends ServiceImpl<GoNewsMapper, GoNews> implements GoNewsService {

    @Override
    public Map<String, Object> pagingQuery(GoNewsVo goNewsVo) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("data", this.getBaseMapper().pagingQuery(goNewsVo));
        map.put("count", this.getBaseMapper().count(goNewsVo));
        return map;
    }
}
